import request from '../utils/request';
import { createTheURL } from '../utils/utils';
import API from '../config/api';

// Service的示例写法
export async function addUser(params) {
  return request(createTheURL(API.userAPI, 'add'), {
    method: 'GET',
    body: params,
  });
}
export async function editUserById(params) {
  return request(createTheURL(API.userAPI, 'edit'), {
    method: 'GET',
    body: params,
  });
}
export async function searchCurrentUserInfo(params) {
  return request(createTheURL(API.userAPI, 'get'), {
    method: 'GET',
    body: params,
  });
}